Integrand size = 27, antiderivative size = 653 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {3 \sqrt {a} d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{4 c (c-d) (c+d)^{5/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\sqrt {a} (2 c-d) d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^2 (c-d)^2 (c+d)^{3/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} d^{3/2} \left (3 c^2-3 c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^3 (c-d)^3 \sqrt {c+d} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {d^2 \tan (e+f x)}{2 c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {3 d^2 \tan (e+f x)}{4 c (c-d) (c+d)^2 f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {(2 c-d) d^2 \tan (e+f x)}{c^2 (c-d)^2 (c+d) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))} \]
[Out]
Time = 0.76 (sec) , antiderivative size = 653, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4025, 186, 65, 212, 44, 214} \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\frac {2 \sqrt {a} \tan (e+f x) \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right )}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {\sqrt {a} d^{3/2} (2 c-d) \tan (e+f x) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right )}{c^2 f (c-d)^2 (c+d)^{3/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {2 \sqrt {a} d^{3/2} \left (3 c^2-3 c d+d^2\right ) \tan (e+f x) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right )}{c^3 f (c-d)^3 \sqrt {c+d} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {3 \sqrt {a} d^{3/2} \tan (e+f x) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right )}{4 c f (c-d) (c+d)^{5/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}-\frac {\sqrt {2} \sqrt {a} \tan (e+f x) \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right )}{f (c-d)^3 \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {d^2 (2 c-d) \tan (e+f x)}{c^2 f (c-d)^2 (c+d) \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))}+\frac {d^2 \tan (e+f x)}{2 c f \left (c^2-d^2\right ) \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}+\frac {3 d^2 \tan (e+f x)}{4 c f (c-d) (c+d)^2 \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))} \]
[In]
[Out]
Rule 44
Rule 65
Rule 186
Rule 212
Rule 214
Rule 4025
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a-a x} (a+a x) (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \left (\frac {1}{a c^3 x \sqrt {a-a x}}-\frac {1}{a (c-d)^3 (1+x) \sqrt {a-a x}}+\frac {d^2}{a c (c-d) \sqrt {a-a x} (c+d x)^3}+\frac {(2 c-d) d^2}{a c^2 (c-d)^2 \sqrt {a-a x} (c+d x)^2}+\frac {d^2 \left (3 c^2-3 c d+d^2\right )}{a c^3 (c-d)^3 \sqrt {a-a x} (c+d x)}\right ) \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {(a \tan (e+f x)) \text {Subst}\left (\int \frac {1}{x \sqrt {a-a x}} \, dx,x,\sec (e+f x)\right )}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {(a \tan (e+f x)) \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a-a x}} \, dx,x,\sec (e+f x)\right )}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\left (a d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{c (c-d) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\left (a (2 c-d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{c^2 (c-d)^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\left (a d^2 \left (3 c^2-3 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{c^3 (c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {d^2 \tan (e+f x)}{2 c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {(2 c-d) d^2 \tan (e+f x)}{c^2 (c-d)^2 (c+d) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {(2 \tan (e+f x)) \text {Subst}\left (\int \frac {1}{1-\frac {x^2}{a}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {(2 \tan (e+f x)) \text {Subst}\left (\int \frac {1}{2-\frac {x^2}{a}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\left (3 a d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{4 c (c-d) (c+d) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\left (a (2 c-d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{2 c^2 (c-d)^2 (c+d) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\left (2 d^2 \left (3 c^2-3 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{c+d-\frac {d x^2}{a}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{c^3 (c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} d^{3/2} \left (3 c^2-3 c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^3 (c-d)^3 \sqrt {c+d} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {d^2 \tan (e+f x)}{2 c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {3 d^2 \tan (e+f x)}{4 c (c-d) (c+d)^2 f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {(2 c-d) d^2 \tan (e+f x)}{c^2 (c-d)^2 (c+d) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}-\frac {\left (3 a d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{8 c (c-d) (c+d)^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\left ((2 c-d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{c+d-\frac {d x^2}{a}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{c^2 (c-d)^2 (c+d) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\sqrt {a} (2 c-d) d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^2 (c-d)^2 (c+d)^{3/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} d^{3/2} \left (3 c^2-3 c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^3 (c-d)^3 \sqrt {c+d} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {d^2 \tan (e+f x)}{2 c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {3 d^2 \tan (e+f x)}{4 c (c-d) (c+d)^2 f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {(2 c-d) d^2 \tan (e+f x)}{c^2 (c-d)^2 (c+d) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {\left (3 d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{c+d-\frac {d x^2}{a}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{4 c (c-d) (c+d)^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{c^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{(c-d)^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {3 \sqrt {a} d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{4 c (c-d) (c+d)^{5/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\sqrt {a} (2 c-d) d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^2 (c-d)^2 (c+d)^{3/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} d^{3/2} \left (3 c^2-3 c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^3 (c-d)^3 \sqrt {c+d} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {d^2 \tan (e+f x)}{2 c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {3 d^2 \tan (e+f x)}{4 c (c-d) (c+d)^2 f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {(2 c-d) d^2 \tan (e+f x)}{c^2 (c-d)^2 (c+d) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(2940\) vs. \(2(653)=1306\).
Time = 22.45 (sec) , antiderivative size = 2940, normalized size of antiderivative = 4.50 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\text {Result too large to show} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(97276\) vs. \(2(564)=1128\).
Time = 18.67 (sec) , antiderivative size = 97277, normalized size of antiderivative = 148.97
[In]
[Out]
Timed out. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\int \frac {1}{\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \left (c + d \sec {\left (e + f x \right )}\right )^{3}}\, dx \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\int { \frac {1}{\sqrt {a \sec \left (f x + e\right ) + a} {\left (d \sec \left (f x + e\right ) + c\right )}^{3}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^3} \, dx=\int \frac {1}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right )}^3} \,d x \]
[In]
[Out]